package at.tuwien.seminar.scrum1.model;

import javax.persistence.*;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Hibernate Customer Model
 *
 *
 *
 * @author Florian Kimmel
 *
 */
@Entity
public class Bill implements Serializable {

    private static final long serialVersionUID = 1L;
	private long id;

    private List<Customer> customers= new ArrayList<Customer>();
    private Double price;
    private Date billDate;
    
    @Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="ID")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

	@ManyToMany
	@JoinTable(name="Bill_Customer")
    public List<Customer> getCustomers() {
        return customers;
    }

    public void setCustomers(List<Customer> customers) {
        this.customers = customers;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Date getBillDate() {
        return billDate;
    }

    public void setBillDate(Date billDate) {
        this.billDate = billDate;
    }


}